const rand_klee_gifs=[
"./img/wait.gif",
"./img/zhuanquan.gif",
"./img/kuqi.gif"
]

$(document).ready(function(){
    var SCREEN_W = window.innerWidth;
    var SCREEN_H = window.innerHeight;
    var randKleePos=function(){
        var x=Math.floor(Math.random()*SCREEN_W);
        var y=Math.floor(Math.random()*SCREEN_H);
        
        var rand_klee= $("#rand_klee");
        rand_klee.attr("src",rand_klee_gifs[Math.floor(Math.random()*rand_klee_gifs.length)]);
        rand_klee.fadeIn();
        rand_klee.offset({top:y,left:x});
        console.log("随机显示可莉x:"+x+" y:"+y);
        setTimeout(function(){
            $("#rand_klee").fadeOut();
              console.log("隐藏可莉");
              setTimeout(randKleePos,3000);
            
        }, 8000);
    };
     randKleePos();
})
